One type of conventional computer system, referred to as an event-based system, relies on events to elicit actions. Event-based systems, include event producers and event consumers. Event producers create events and communicate these events to the system. Event consumers act on or process the events.
Event-based systems can have a small or large number of event producers and event consumers. A small event-based system may have only a few event producers and a few event consumers. In such small event-based systems, one event producer is often tied to one event consumer. In larger event-based systems, many event producers create events, which are directed to many event consumers. In such large event-based systems, one event is often sent to many event consumers.
Generally, events are requests for some action. General event types include user-input events, system messaging events, and inter-application events. User-input events are initialized by a system user and include events such as a keystroke, a mouse click, and a disk file insertion. System messaging events are messages between an operating system and an application program. Examples of system messaging events include requests to create a new file, display a window, and change the contents of a file. Inter-application events are requests for action between application programs including connecting to a network and communicating through a network. Each of these events is directed to at least one event consumer for event processing.
Event management systems, which operate on event-based systems, manage events. In small event-based systems, an event management system handles a small number of events with a limited set of event consumers. In a small event-based system, the event management system is often a series of computer program instructions or statements, which compare event information to selected criteria and direct the event to the appropriate event consumer. For example, an event management system can include a switch statement with multiple cases written in C language code or a series of if statements with jump instructions written in another language. These decision-making statements are typically stored in one or more source code files. Similarly, the event consumers are also typically stored in one or more source code files. The decision-making statements and event consumers are compiled together to create an executable program.
In small event-based systems, new event consumers may be added to increase functionality. For example, new event consumers are added to accommodate expanded user needs or for debugging and testing purposes. Adding a new event consumer typically involves changing the decision-making code, adding the new event consumer to the source code, and recompiling to create a new executable program. Assuming that the old executable program was tested, adding a new event consumer destabilizes the event-based system platform, which results in additional system testing. Adding a new event consumer for debugging and testing not only changes the code under test, but removing the debugging and testing code destabilizes the tested event-based system platform. Although the new event consumer could be retained in the new code after testing, the new code would take up more memory space, which is often at a premium.
During operation, an event-based system receives an event from an event producer. In a small event-based system, this event is passed to the decision-making statements. The decision-making statements compare the event information to selected criteria, one at a time, until the event information arrives at the appropriate case or if statement. The executable program then calls the selected event consumer and the event is processed. This event management operation is time consuming, and it is possible that during this event management operation, the event-based system will not be able to respond to new events. Consequently, events can be dropped due to an overrun condition resulting from limited resources. Also, other portions of the event-based system are potentially starved for data while the system is processing events.
In larger event-based systems, the event management system handles a large number of events using a large number of event consumers. Some larger, more complex event management systems do not have the above problems associated with small event management systems. Nevertheless, larger event management systems typically employ operating system facilities to manage events. For example, some large event management systems are implemented with multi-tasking facilities of the operating system. In a multi-tasking environment, system functionality is divided into small functional units, such that a specific function is associated with a specific task. The operating system switches between these tasks to complete processing in an operation referred to as context switching. During context switching, copies of data being processed are stored in memory, while other data are switched in for processing. Thus, the multi-tasking environment adds overhead to the event-based system in the form of processing time and memory requirements. The multi-tasking overhead can significantly degrade system performance. In addition, in some systems the multi-tasking memory requirements exceed the amount of available memory.
For reasons stated above and for other reasons presented in the description of the preferred embodiments section of the present specification, an improved event management system is desired which does not have the above problems associated with small event management systems and which can be implemented in a single-tasking environment.